﻿using System;
using System.ComponentModel;
using FileTransSystem.domain;

namespace FileTransSystem.ViewModel
{
    public class ShareDownloadDialogViewModel : INotifyPropertyChanged
    {
        private string _inviteCode;

        public string InviteCode
        {
            get => _inviteCode;
            set
            {
                this.MutateVerbose(ref _inviteCode, value, RaisePropertyChanged());
            }
        }


        public event PropertyChangedEventHandler PropertyChanged;

        private Action<PropertyChangedEventArgs> RaisePropertyChanged()
        {
            return args => PropertyChanged?.Invoke(this, args);
        }
    }
}